# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mycroft-skills-manager
pkgver=0.9.0
pkgrel=0
pkgdesc="Mycroft Skills Manager"
url="https://github.com/MycroftAI/mycroft-skills-manager"
arch="noarch"
license="Apache-2.0"
depends="
	py3-fasteners
	py3-gitpython
	py3-lazy
	py3-pako
	py3-requests
	py3-xdg
	py3-yaml
	python3
	"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/MycroftAI/mycroft-skills-manager/archive/refs/tags/release/v$pkgver.tar.gz"
# net required for tests
options="net"
builddir="$srcdir/$pkgname-release-v$pkgver"

build() {
	python3 setup.py build
}

check() {
	# test_main is broken, https://github.com/MycroftAI/mycroft-skills-manager/issues/80
	PYTHONPATH="$PWD/build/lib" pytest -k 'not test_main and not test_from_folder'
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
b7888f14c8ee0df01686311ef092bac5716a2fa192a12d271419b14096c67af43dfa93d41e1156fd6fe85a6575ec6953728eff742770f398d55599f53a77e712  mycroft-skills-manager-0.9.0.tar.gz
"
